package cn.tannn.surenessdemo;

import cn.jdevelops.schema.scan.EnableAutoSchema;
import cn.jdevelops.spring.core.context.ContextUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
@ServletComponentScan
@EnableAutoSchema
public class SurenessDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(SurenessDemoApplication.class, args);
    }

    @ConditionalOnMissingBean(ContextUtil.class)
    @Bean
    public ContextUtil contextUtil(){
        return new ContextUtil();
    }

}
